import java.util.Arrays;

public class test {
    public static void my_sort(int [] arr1){
        for (int i = 0; i < arr1.length - 1; i++) {
            for (int j = 0; j < arr1.length - 1 - i; j++) {
                if(arr1[j] > arr1[j + 1]){
                    int mid = arr1[j];
                    arr1[j] = arr1[j + 1];
                    arr1[j + 1] = mid;
                }
            }
        }
    }
    public static void main(String[] args) {
        //冒泡排序
        int[] arr1 = {4,23,4,5,6,7,54,35};
        my_sort(arr1);
        System.out.println(Arrays.toString(arr1));
    }
}
